import {request, config} from 'utils'
import * as commonService from "utils/services";

const {api} = config;
const {financialSettlementApply} = api;

export async function query(params = {}) {
  params.apiBaseUrl = `${financialSettlementApply}`;
  return commonService.commonQuery(params);
}

export async function detail(id) {
  const url = `${financialSettlementApply}/${id}/detail`;
  return request({url: url, method: 'GET', data: {}})
}

export async function receivable(data) {
  const url = `${financialSettlementApply}/receivable`;
  return request({url: url, method: 'POST', data: data})
}

export async function payable(data) {
  const url = `${financialSettlementApply}/payable`;
  return request({url: url, method: 'POST', data: data})
}
